<template>
  <div class="keepalive-list">
    <div>keepalive List</div>
    <ul class="ul-style" ref="bbbb">
      <li
        class="list-acr"
        v-for="(item, idx) in Array(50)"
        :key="idx"
        @click="getKeepDetails(idx)"
      >
        this is line --{{ idx }}
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  created() {
    console.log('========"keepIndex"');
  },
  activated() {
    //   console.log('=========keepOne = activated');
  },
  mounted() {
    this.$nextTick(() => {
      this.$refs.bbbb.scrollTo(0, 5000);
    });
  },
  methods: {
    getKeepDetails(idx) {
      this.$router.push({
        name: "keepDetails",
        query: {
          id: idx,
        },
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.keepalive-list {
  height: 100%;
  .ul-style {
    margin: 0;
    padding: 5px;
    .list-acr {
      margin-top: 10px;
      padding: 8px;
      list-style: none;
      border: 1px solid #ccc;
    }
  }
}
</style>